﻿// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
//
// 本项目主要遵循 MIT 许可证和 Apache 许可证（版本 2.0）进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
//
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动！任何基于本项目二次开发而产生的一切法律纠纷和责任，我们不承担任何责任！

using Admin.NET.Core;
using Magicodes.ExporterAndImporter.Core;
using Magicodes.ExporterAndImporter.Excel;
using System.ComponentModel.DataAnnotations;

namespace Admin.NET.Application;

/// <summary>
/// 客户管理:客户表基础输入参数
/// </summary>
public class ClientBaseInput
{
    /// <summary>
    /// 主键Id
    /// </summary>
    public virtual long? Id { get; set; }
    
    /// <summary>
    /// 客户编码
    /// </summary>
    public virtual string? CustomerNumber { get; set; }
    
    /// <summary>
    /// 客户简称
    /// </summary>
    public virtual string? CustomerAbbreviation { get; set; }
    
    /// <summary>
    /// 客户简介
    /// </summary>
    public virtual string? CustomerProfile { get; set; }
    
    /// <summary>
    /// 客户邮箱
    /// </summary>
    public virtual string? CustomerMailbox { get; set; }
    
    /// <summary>
    /// 联系人1-姓名
    /// </summary>
    public virtual string? ContactNameOne { get; set; }
    
    /// <summary>
    /// 联系人2-姓名
    /// </summary>
    public virtual string? ContactNameTwo { get; set; }
    
    /// <summary>
    /// 备注
    /// </summary>
    public virtual string? Remark { get; set; }
    
    /// <summary>
    /// 客户名称
    /// </summary>
    public virtual string? CustomerName { get; set; }
    
    /// <summary>
    /// 客户英文名称
    /// </summary>
    public virtual string? CustomerEnglishName { get; set; }
    
    /// <summary>
    /// 客户地址
    /// </summary>
    public virtual string? CustomerAddress { get; set; }
    
    /// <summary>
    /// 客户电话
    /// </summary>
    public virtual string? CustomerCall { get; set; }
    
    /// <summary>
    /// 联系人1-电话
    /// </summary>
    public virtual string? ContactPhoneOne { get; set; }
    
    /// <summary>
    /// 联系人2-电话
    /// </summary>
    public virtual string? ContactPhoneTwo { get; set; }
    
    /// <summary>
    /// 出库上限
    /// </summary>
    public virtual int? DeliveryCeiling { get; set; }
    
    /// <summary>
    /// 订单号
    /// </summary>
    public virtual string? ClientOrderNumber { get; set; }
    
    /// <summary>
    /// 客户类型
    /// </summary>
    public virtual string? ClientType { get; set; }
    
    /// <summary>
    /// 客户官网
    /// </summary>
    public virtual string? CustomersOfficialWebsite { get; set; }
    
    /// <summary>
    /// 社会信用代码
    /// </summary>
    public virtual string? SocialCreditCode { get; set; }
    
    /// <summary>
    /// 联系人1-邮箱
    /// </summary>
    public virtual string? ContactEmailOne { get; set; }
    
    /// <summary>
    /// 联系人2-邮箱
    /// </summary>
    public virtual string? ContactEmailTwo { get; set; }
    
    /// <summary>
    /// 出库下限
    /// </summary>
    public virtual int? LowerlimitOfDelivery { get; set; }
    
    /// <summary>
    /// 是否有效
    /// </summary>
    public virtual bool? IsEnabled { get; set; }
    
}

/// <summary>
/// 客户管理:客户表分页查询输入参数
/// </summary>
public class PageClientInput : BasePageInput
{
    /// <summary>
    /// 客户编码
    /// </summary>
    public string? CustomerNumber { get; set; }
    
    /// <summary>
    /// 客户简称
    /// </summary>
    public string? CustomerAbbreviation { get; set; }
    
    /// <summary>
    /// 客户名称
    /// </summary>
    public string? CustomerName { get; set; }
    
    /// <summary>
    /// 客户英文名称
    /// </summary>
    public string? CustomerEnglishName { get; set; }
    
    /// <summary>
    /// 客户电话
    /// </summary>
    public string? CustomerCall { get; set; }
    
    /// <summary>
    /// 是否有效
    /// </summary>
    public bool? IsEnabled { get; set; }
    
    /// <summary>
    /// 选中主键列表
    /// </summary>
     public List<long> SelectKeyList { get; set; }
}

/// <summary>
/// 客户管理:客户表增加输入参数
/// </summary>
public class AddClientInput
{
    /// <summary>
    /// 客户编码
    /// </summary>
    [MaxLength(32, ErrorMessage = "客户编码字符长度不能超过32")]
    public string? CustomerNumber { get; set; }
    
    /// <summary>
    /// 客户简称
    /// </summary>
    [MaxLength(32, ErrorMessage = "客户简称字符长度不能超过32")]
    public string? CustomerAbbreviation { get; set; }
    
    /// <summary>
    /// 客户简介
    /// </summary>
    [MaxLength(32, ErrorMessage = "客户简介字符长度不能超过32")]
    public string? CustomerProfile { get; set; }
    
    /// <summary>
    /// 客户邮箱
    /// </summary>
    [MaxLength(32, ErrorMessage = "客户邮箱字符长度不能超过32")]
    public string? CustomerMailbox { get; set; }
    
    /// <summary>
    /// 联系人1-姓名
    /// </summary>
    [MaxLength(32, ErrorMessage = "联系人1-姓名字符长度不能超过32")]
    public string? ContactNameOne { get; set; }
    
    /// <summary>
    /// 联系人2-姓名
    /// </summary>
    [MaxLength(32, ErrorMessage = "联系人2-姓名字符长度不能超过32")]
    public string? ContactNameTwo { get; set; }
    
    /// <summary>
    /// 备注
    /// </summary>
    [MaxLength(32, ErrorMessage = "备注字符长度不能超过32")]
    public string? Remark { get; set; }
    
    /// <summary>
    /// 客户名称
    /// </summary>
    [MaxLength(32, ErrorMessage = "客户名称字符长度不能超过32")]
    public string? CustomerName { get; set; }
    
    /// <summary>
    /// 客户英文名称
    /// </summary>
    [MaxLength(32, ErrorMessage = "客户英文名称字符长度不能超过32")]
    public string? CustomerEnglishName { get; set; }
    
    /// <summary>
    /// 客户地址
    /// </summary>
    [MaxLength(32, ErrorMessage = "客户地址字符长度不能超过32")]
    public string? CustomerAddress { get; set; }
    
    /// <summary>
    /// 客户电话
    /// </summary>
    [MaxLength(32, ErrorMessage = "客户电话字符长度不能超过32")]
    public string? CustomerCall { get; set; }
    
    /// <summary>
    /// 联系人1-电话
    /// </summary>
    [MaxLength(32, ErrorMessage = "联系人1-电话字符长度不能超过32")]
    public string? ContactPhoneOne { get; set; }
    
    /// <summary>
    /// 联系人2-电话
    /// </summary>
    [MaxLength(32, ErrorMessage = "联系人2-电话字符长度不能超过32")]
    public string? ContactPhoneTwo { get; set; }
    
    /// <summary>
    /// 出库上限
    /// </summary>
    public int? DeliveryCeiling { get; set; }
    
    /// <summary>
    /// 订单号
    /// </summary>
    [MaxLength(32, ErrorMessage = "订单号字符长度不能超过32")]
    public string? ClientOrderNumber { get; set; }
    
    /// <summary>
    /// 客户类型
    /// </summary>
    [MaxLength(32, ErrorMessage = "客户类型字符长度不能超过32")]
    public string? ClientType { get; set; }
    
    /// <summary>
    /// 客户官网
    /// </summary>
    [MaxLength(32, ErrorMessage = "客户官网字符长度不能超过32")]
    public string? CustomersOfficialWebsite { get; set; }
    
    /// <summary>
    /// 社会信用代码
    /// </summary>
    [MaxLength(32, ErrorMessage = "社会信用代码字符长度不能超过32")]
    public string? SocialCreditCode { get; set; }
    
    /// <summary>
    /// 联系人1-邮箱
    /// </summary>
    [MaxLength(32, ErrorMessage = "联系人1-邮箱字符长度不能超过32")]
    public string? ContactEmailOne { get; set; }
    
    /// <summary>
    /// 联系人2-邮箱
    /// </summary>
    [MaxLength(32, ErrorMessage = "联系人2-邮箱字符长度不能超过32")]
    public string? ContactEmailTwo { get; set; }
    
    /// <summary>
    /// 出库下限
    /// </summary>
    public int? LowerlimitOfDelivery { get; set; }
    
    /// <summary>
    /// 是否有效
    /// </summary>
    public bool? IsEnabled { get; set; }
    
}

/// <summary>
/// 客户管理:客户表删除输入参数
/// </summary>
public class DeleteClientInput
{
    /// <summary>
    /// 主键Id
    /// </summary>
    [Required(ErrorMessage = "主键Id不能为空")]
    public long? Id { get; set; }
    
}

/// <summary>
/// 客户管理:客户表更新输入参数
/// </summary>
public class UpdateClientInput
{
    /// <summary>
    /// 主键Id
    /// </summary>    
    [Required(ErrorMessage = "主键Id不能为空")]
    public long? Id { get; set; }
    
    /// <summary>
    /// 客户编码
    /// </summary>    
    [MaxLength(32, ErrorMessage = "客户编码字符长度不能超过32")]
    public string? CustomerNumber { get; set; }
    
    /// <summary>
    /// 客户简称
    /// </summary>    
    [MaxLength(32, ErrorMessage = "客户简称字符长度不能超过32")]
    public string? CustomerAbbreviation { get; set; }
    
    /// <summary>
    /// 客户简介
    /// </summary>    
    [MaxLength(32, ErrorMessage = "客户简介字符长度不能超过32")]
    public string? CustomerProfile { get; set; }
    
    /// <summary>
    /// 客户邮箱
    /// </summary>    
    [MaxLength(32, ErrorMessage = "客户邮箱字符长度不能超过32")]
    public string? CustomerMailbox { get; set; }
    
    /// <summary>
    /// 联系人1-姓名
    /// </summary>    
    [MaxLength(32, ErrorMessage = "联系人1-姓名字符长度不能超过32")]
    public string? ContactNameOne { get; set; }
    
    /// <summary>
    /// 联系人2-姓名
    /// </summary>    
    [MaxLength(32, ErrorMessage = "联系人2-姓名字符长度不能超过32")]
    public string? ContactNameTwo { get; set; }
    
    /// <summary>
    /// 备注
    /// </summary>    
    [MaxLength(32, ErrorMessage = "备注字符长度不能超过32")]
    public string? Remark { get; set; }
    
    /// <summary>
    /// 客户名称
    /// </summary>    
    [MaxLength(32, ErrorMessage = "客户名称字符长度不能超过32")]
    public string? CustomerName { get; set; }
    
    /// <summary>
    /// 客户英文名称
    /// </summary>    
    [MaxLength(32, ErrorMessage = "客户英文名称字符长度不能超过32")]
    public string? CustomerEnglishName { get; set; }
    
    /// <summary>
    /// 客户地址
    /// </summary>    
    [MaxLength(32, ErrorMessage = "客户地址字符长度不能超过32")]
    public string? CustomerAddress { get; set; }
    
    /// <summary>
    /// 客户电话
    /// </summary>    
    [MaxLength(32, ErrorMessage = "客户电话字符长度不能超过32")]
    public string? CustomerCall { get; set; }
    
    /// <summary>
    /// 联系人1-电话
    /// </summary>    
    [MaxLength(32, ErrorMessage = "联系人1-电话字符长度不能超过32")]
    public string? ContactPhoneOne { get; set; }
    
    /// <summary>
    /// 联系人2-电话
    /// </summary>    
    [MaxLength(32, ErrorMessage = "联系人2-电话字符长度不能超过32")]
    public string? ContactPhoneTwo { get; set; }
    
    /// <summary>
    /// 出库上限
    /// </summary>    
    public int? DeliveryCeiling { get; set; }
    
    /// <summary>
    /// 订单号
    /// </summary>    
    [MaxLength(32, ErrorMessage = "订单号字符长度不能超过32")]
    public string? ClientOrderNumber { get; set; }
    
    /// <summary>
    /// 客户类型
    /// </summary>    
    [MaxLength(32, ErrorMessage = "客户类型字符长度不能超过32")]
    public string? ClientType { get; set; }
    
    /// <summary>
    /// 客户官网
    /// </summary>    
    [MaxLength(32, ErrorMessage = "客户官网字符长度不能超过32")]
    public string? CustomersOfficialWebsite { get; set; }
    
    /// <summary>
    /// 社会信用代码
    /// </summary>    
    [MaxLength(32, ErrorMessage = "社会信用代码字符长度不能超过32")]
    public string? SocialCreditCode { get; set; }
    
    /// <summary>
    /// 联系人1-邮箱
    /// </summary>    
    [MaxLength(32, ErrorMessage = "联系人1-邮箱字符长度不能超过32")]
    public string? ContactEmailOne { get; set; }
    
    /// <summary>
    /// 联系人2-邮箱
    /// </summary>    
    [MaxLength(32, ErrorMessage = "联系人2-邮箱字符长度不能超过32")]
    public string? ContactEmailTwo { get; set; }
    
    /// <summary>
    /// 出库下限
    /// </summary>    
    public int? LowerlimitOfDelivery { get; set; }
    
    /// <summary>
    /// 是否有效
    /// </summary>    
    public bool? IsEnabled { get; set; }
    
}

/// <summary>
/// 客户管理:客户表主键查询输入参数
/// </summary>
public class QueryByIdClientInput : DeleteClientInput
{
}

/// <summary>
/// 客户管理:客户表数据导入实体
/// </summary>
[ExcelImporter(SheetIndex = 1, IsOnlyErrorRows = true)]
public class ImportClientInput : BaseImportInput
{
    /// <summary>
    /// 客户编码
    /// </summary>
    [ImporterHeader(Name = "客户编码")]
    [ExporterHeader("客户编码", Format = "", Width = 25, IsBold = true)]
    public string? CustomerNumber { get; set; }
    
    /// <summary>
    /// 客户简称
    /// </summary>
    [ImporterHeader(Name = "客户简称")]
    [ExporterHeader("客户简称", Format = "", Width = 25, IsBold = true)]
    public string? CustomerAbbreviation { get; set; }
    
    /// <summary>
    /// 客户名称
    /// </summary>
    [ImporterHeader(Name = "客户名称")]
    [ExporterHeader("客户名称", Format = "", Width = 25, IsBold = true)]
    public string? CustomerName { get; set; }
    
    /// <summary>
    /// 客户电话
    /// </summary>
    [ImporterHeader(Name = "客户电话")]
    [ExporterHeader("客户电话", Format = "", Width = 25, IsBold = true)]
    public string? CustomerCall { get; set; }
    
    /// <summary>
    /// 联系人1-电话
    /// </summary>
    [ImporterHeader(Name = "联系人1-电话")]
    [ExporterHeader("联系人1-电话", Format = "", Width = 25, IsBold = true)]
    public string? ContactPhoneOne { get; set; }
    
    /// <summary>
    /// 联系人2-电话
    /// </summary>
    [ImporterHeader(Name = "联系人2-电话")]
    [ExporterHeader("联系人2-电话", Format = "", Width = 25, IsBold = true)]
    public string? ContactPhoneTwo { get; set; }
    
    /// <summary>
    /// 客户类型
    /// </summary>
    [ImporterHeader(Name = "客户类型")]
    [ExporterHeader("客户类型", Format = "", Width = 25, IsBold = true)]
    public string? ClientType { get; set; }
    public object WhetherItWorks { get; internal set; }
}
